
    //懒加载
    $("img").lazyload();

    $.get('http://139.199.157.195:9090/api/getbrandtitle',function(data){
        var html=template('hollow-js',{list:data.result});
        $('#hollow').html(html);//模板渲染

        //console.log(data.result[5].brandTitle);
    });

    //通过事件委托在每次点击a标签后储存对应的brandTitleId与categoryId
    $('#hollow').on('click','.brand-a',function(){
        //$.cookie('brandTitleId', '',{path:'/'});
        var brandId= $(this).attr('brandTitleId');
        var categoryId= $(this).attr('categoryId');

        localStorage.setItem('brandTitleId',brandId);
        localStorage.setItem('categoryId',categoryId);

        console.log(brandId);
        console.log(localStorage.getItem('brandTitleId'));
        //console.log(localStorage.getItem('categoryId'));
    });



